﻿<%@ Page Title="" Language="C#" MasterPageFile="~/web/common/admin_common.Master" AutoEventWireup="true" CodeBehind="Detail.aspx.cs" Inherits="shop.web.view_admin.goods.Detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>查看商品</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="fly-panel" pad20 style="padding-top: 5px;">
        <div class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief" lay-filter="user">
                <ul class="layui-tab-title">
                    <li class="layui-this">查看商品</li>
                </ul>
                <div  class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;" >
                   
                    <div class="layui-tab-item layui-show">
                       
                            <input type="hidden" name="id" value="<%=goods.Id %>" />
                            <div class="layui-form-item">
                                <label for="L_name" class="layui-form-label">
                                    商品名称</label>
                                <span class="layui-input-inline">

                                   <input type="text" id="L_name" name="name" required lay-verify="required" placeholder="商品名称"
                                        autocomplete="off" class="layui-input" value="<%=goods.Name %>" />
                                </span>
                            </div>
                            <div class="layui-form-item">
                                <label for="L_price" class="layui-form-label">
                                    商品价格</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_price" name="price" required lay-verify="required" placeholder="商品价格"
                                        autocomplete="off" class="layui-input" value="<%=goods.Price %>"/>
                                </div>
                            </div>

                            <div class="layui-form-item layui-form-text">
                                <span class="layui-form-label">商品写描述</span>
                                <div class="layui-input-block">
                                    <div class="layui-textarea" ><%=goods.Description %></div>
                                </div>
                            </div>
                           
                            <div class="layui-inline  layui-form-item">
                                <label class="layui-form-label">
                                    商品类别</label>
                                <div class="layui-input-block catagory">
                                   <select lay-verify="required" name="catagoryId">
                                        <option></option>
                                        <%foreach (var catagory in catagoryList)
                                            {
                                                if (catagory.Id == goods.CategoryId)
                                                {
                                        %>
                                        <option value="<%=catagory.Id %>" selected><%=catagory.Name %></option>
                                        <%
                                            }else{                                                                                     
                                        %>
                                        <option value="<%=catagory.Id %>"><%=catagory.Name %></option>
                                        <%
                                                }

                                            }
                                        %>
                                    </select>
                                </div>
                            </div>                                                                 
                         <div class="layui-form-item">
                                <button class="layui-btn back" type="button">
                                    返回</button>
                            </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="../../resource/wangEditor/wangEditor.min.js"></script>

    <script>


        layui.use('form', function () {
            var form = layui.form;
        })
        

      

        $(".back").click(function () {
            history.go(-1);
        })

    </script>
</asp:Content>

